home *** CD-ROM | disk | FTP | other *** search
/ The Best of MacTutor - S…e Code for Volumes 1 to 5 / The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin / Source Code / #48 (Sep 89) / Zoundz Source / MyGlobals.Pas < prev    next >
Pascal/Delphi Source File  |  1989-04-27  |  2KB  |  83 lines

  1. unit MyGlobals;
  2. interface
  3.     uses
  4.         PrintTraps, Sound;
  5.  
  6.     const
  7.         L_Apple = 1001;             {Menu list}
  8.         MI_About_Zoundz = 1;
  9.         L_File = 1002;              {Menu list}
  10.         MI_New = 1;
  11.         MI_Open = 2;
  12.         MI_Close = 4;
  13.         MI_Save = 5;
  14.         MI_Save_As = 6;
  15.         MI_Page_Setup = 8;
  16.         MI_Print = 9;
  17.         MI_Quit = 11;
  18.         L_Edit = 1003;              {Menu list}
  19.         MI_Undo = 1;
  20.         MI_Cut = 3;
  21.         MI_Copy = 4;
  22.         MI_Paste = 5;
  23.         L_Extend = 1004;    {Menu list}
  24.         MI_Frequency = 1;
  25.         MI_Amplitude = 2;
  26.         MI_Duration = 3;
  27.         MI_Timbre = 4;
  28.  
  29.         I_Yes = 1;
  30.         I_Cancel = 2;
  31.         I_No = 3;
  32.     type
  33.         DocPtr = ^DocRec;
  34.         DocRec = record {Sound Doc Structure}
  35.                 Freq, Amp, Dur, Timbre: array[1..100] of integer;
  36.                 EndValue, StartValue: integer;
  37.             end;
  38.  
  39.         MySoundRec = packed record {Snd structure}
  40.                 format: integer;
  41.                 SynthCount: integer;
  42.                 SynthType: integer;
  43.                 SynthInit: longint;
  44.                 CommandCount: integer;
  45.                 MySounds: array[1..202] of SndCommand;
  46.             end;
  47.  
  48.         MySoundPtr = ^MySoundRec;
  49.         MySoundHdl = ^MySoundPtr;
  50.  
  51.     var
  52.         FreqText, AmpText, DurText, TimbreText: Str255; {Text Strings}
  53.         NoteText, StartText, EndText: Str255;
  54.  
  55.         NoteIndex, DrawTool: integer; {Indices}
  56.  
  57.         MyDoc: DocPtr; {Sound Document}
  58.         Dirty: boolean;
  59.  
  60.         NoteRect, FreqRect, AmpRect, DurRect, TimbreRect: Rect; {Text Rectangles}
  61.         EndRect, StartRect, NotePallete: Rect;
  62.  
  63.         MyHandle: Handle;  {Various Handles}
  64.         MySoundHandle: MySoundHdl;
  65.  
  66.         AppleMenu: MenuHandle;           {Menu handle}
  67.         M_File: MenuHandle;
  68.         M_Edit: MenuHandle;
  69.         M_Extend: MenuHandle;
  70.  
  71.         MyWindow: WindowPtr;           {Window pointer}
  72.  
  73.         FileName: str255;                            {File Stuff}
  74.         volRefNum, FileStatus: integer;
  75.  
  76.         theSquare, theWatch: CursHandle; {Cursor Stuff}
  77.  
  78.         ThePrintRec: THPrint; {Printing Stuff}
  79.         ThePrintPort: TPPrPort;
  80.         PrintStatus: TPrStatus;
  81.         PageRect: rect;
  82. implementation
  83. end.